Repository navigation
feat: establish shared file ownership foundation - #8609
mzxchandra wants to merge 39 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Add canonical entity ownership while preserving legacy workspace writers. Make storage accounting, lifecycle cleanup, search, document artifacts, and realtime transport tolerate project-owned data before feature activation. Keep Project file user/API/tool entry points in the stacked feature change.
9a1af75 to
6f8882e
Compare
|
@cubic-dev-ai review this PR |
@mzxchandra I have started the AI code review. It will take a few minutes to complete. |
|
Comments Outside DiffThese findings could not be posted inline.
|
|
@greptileai review |
|
@cubic-dev-ai review |
@mzxchandra I have started the AI code review. It will take a few minutes to complete. |
There was a problem hiding this comment.
All reported issues were addressed across 216 files
Heads up: you’ve reached your flex budget. Increase your flex budget or wait for usage to reset.
Note: This PR contains a large number of files. cubic selects up to 200 of the highest-priority eligible files for this review, so some files may not have been reviewed.
You've manually re-run cubic several times on this PR. Each manual re-review checks the full PR again and counts toward your usage quota. To preserve your usage limits, we recommend letting cubic automatically review new commits.
Turn on auto-fix | Re-trigger cubic
|
@greptileai review — current code includes the historical repair fixture migration-boundary fix; its 9 PostgreSQL/Redis cases pass. |
|
@cubic-dev-ai review — current code includes the historical repair fixture migration-boundary fix; its 9 PostgreSQL/Redis cases pass. |
@mzxchandra I have started the AI code review. It will take a few minutes to complete. |
There was a problem hiding this comment.
No issues found across 217 files
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Heads up: you’ve reached your flex budget. Increase your flex budget or wait for usage to reset.
Note: This PR contains a large number of files. cubic selects up to 200 of the highest-priority eligible files for this review, so some files may not have been reviewed.
You've manually re-run cubic several times on this PR. Each manual re-review checks the full PR again and counts toward your usage quota. To preserve your usage limits, we recommend letting cubic automatically review new commits.
Turn on auto-fix | Re-trigger cubic
|
@greptileai review — current head e3e0f52 addresses the verified lifecycle, search, storage, realtime and audit-base findings with focused regression coverage. |
|
@cubic-dev-ai review — current head e3e0f52 addresses the verified findings. Individual threads include fixes or current-code evidence for rejected findings. |
@mzxchandra I have started the AI code review. It will take a few minutes to complete. |
|
@greptileai review — 9569da8 uses supported copy-and-sort/reverse array operations; the input identity regression passes. |
|
@cubic-dev-ai review — 9569da8 uses supported copy-and-sort/reverse array operations; the input identity regression passes. |
@mzxchandra I have started the AI code review. It will take a few minutes to complete. |
There was a problem hiding this comment.
No issues found across 220 files
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Heads up: you’ve reached your flex budget. Increase your flex budget or wait for usage to reset.
Note: This PR contains a large number of files. cubic selects up to 200 of the highest-priority eligible files for this review, so some files may not have been reviewed.
You've manually re-run cubic several times on this PR. Each manual re-review checks the full PR again and counts toward your usage quota. To preserve your usage limits, we recommend letting cubic automatically review new commits.
Turn on auto-fix | Re-trigger cubic
|
@greptileai review — d43cdd4 corrects the branch boundary: foundation owned-file creation uses its existing billing API; the newer accounting helper remains in #8610. |
|
@cubic-dev-ai review — d43cdd4 corrects the branch boundary: foundation owned-file creation uses its existing billing API; the newer accounting helper remains in #8610. |
@mzxchandra I have started the AI code review. It will take a few minutes to complete. |
There was a problem hiding this comment.
No issues found across 220 files
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Heads up: you’ve reached your flex budget. Increase your flex budget or wait for usage to reset.
Note: This PR contains a large number of files. cubic selects up to 200 of the highest-priority eligible files for this review, so some files may not have been reviewed.
You've manually re-run cubic several times on this PR. Each manual re-review checks the full PR again and counts toward your usage quota. To preserve your usage limits, we recommend letting cubic automatically review new commits.
Turn on auto-fix | Re-trigger cubic
Summary
project_idFK alongsideworkspace_idandorganization_id; enforce at most one owner. Existing personal/chat attachments retain their ownerless representation and policy.entityType/entityIdinterface above storage. Native FKs enforce owner existence; shared locks and lifecycle helpers cover files, folders, versions, billing, search, sharing and cleanup.Stack: #8590 → #8609 → #8610 → #8781. Includes the lifecycle prerequisite #8762 for local integration; keep its independent merge dependency. #8580 has merged.
Rollout
Deploy compatible app, realtime and background consumers and verify older consumers have retired before enabling Project files. Traffic cutover alone is insufficient. Projects and Project files remain disabled by default. This foundation remains the compatible rollback target after Project-owned rows exist. Earlier draft migrations were used only on disposable databases.
Type of Change
Testing
Hosted CI and standalone desktop-e2e passed on
d43cdd46eec6e3ce638481965b27cee5ac2ea2cc; Greptile and Cubic completed, with all review threads answered and resolved.Current membership alignment:
workspace.project_id, native deferred constraints, and marker-free rollback. File creation, organization transfer, account teardown, creator handoff, and copy prerequisites use the direct membership column.Checklist